<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<base target="_self">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<META HTTP-EQUIV="pragma" CONTENT="no-cache"> 
	<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate"> 
	<META HTTP-EQUIV="expires" CONTENT="0">
<meta name="viewport" content="width=device-width" />
<meta name="keywords" content="" />
<meta name="description" content="A jQuery plugin to add qr codes to your pages" />
<title>国家税务总局全国增值税发票查验平台</title>
<script language="javascript">
    document.write("<l" + "ink rel='stylesheet' type='text/css' href='css/common.css?"+Math.random()+"' />");
  document.write("<s"+"cript charset='utf-8' type='text/javascript' src='js/jquery.min.js'></scr"+"ipt>"); 
  document.write("<s"+"cript charset='utf-8' type='text/javascript' src='js/jquery.PrintArea.js'></scr"+"ipt>"); 
  document.write("<s"+"cript charset='utf-8' type='text/javascript' src='js/result.js?"+Math.random()+"'></scr"+"ipt>"); 
</script>
<style type="text/css" media="screen">
	.shuiyin {background:url(images/shuiyin.png) repeat; width:100%; position:absolute;left:0px; top:0px;z-index:1; }
</style>
<style type="text/css" media="print">
	.shuiyin { width:100%; position:absolute;left:0px; top:0px;z-index:-1; }
</style>
</head>

<body >
<script>
var xiaoji1 = 0.0;
var xiaoji2 = 0.0;
var zongji1 = 0.0;
var zongji2 = 0.0;
</script> 

<!--content begin-->
<div id="content" class="clearfix">
<a href="#" id="dialogclose">&times;</a>
  
  <div id="cms_r">
    <div class="title">发票查验明细</div>
    <div class="cms_r_main">
      <div class="chayan_div">
      <div id="print_area" class="printdiv" >
        <table  border="1" class="comm_table2" width="100%" >
          <tr>
            <td colspan="4" style="background-color:#2498ef;color:#fff; "><span id="cycs">查验次数：第1次</span>
            <span style="padding-left:50px;" id="cysj">查验时间：2015-07-08 09:37:22</span>
            <span style="float:right">
            <button id="printfp" class="white_button" style="position:relative!important;z-index:100" onmousemove="this.className='green_button';" onmouseout="this.className='white_button';">打印</button>
            <button id="closebt" class="white_button" style="position:relative!important;z-index:100" onmousemove="this.className='green_button';" onmouseout="this.className='white_button';" onclick="window.close();">关闭</button></span>
            </td>
          </tr>
        </table>
      
        <div id='bg_div' class="shuiyin"></div>
          <div id="tabPage2" >

            <div class="tab-page" id="tabPage-dzfp">
              <h1 id="fpcc_dzfp" style="color:#574B9D;padding:5px 0px 5px 0px; text-align:center;"><strong>广东增值税普通发票（电子）</strong></h1>
              <table border="0" cellpadding="0" cellspacing="0" style="width:100%" >
                <tr height="30">                  
                  <td class="align_left">发票代码：<span class="content_td_blue" id="fpdm_dzfp"></span></td>
                  <td>&nbsp;</td>
                  <td class="align_left">发票号码：<span class="content_td_blue" id="fphm_dzfp"></span></td>
                  <td>&nbsp;</td>
                  <td class="align_left">开票日期：<span class="content_td_blue" id="kprq_dzfp"></span></td>
                  <td>&nbsp;</td>
                  <td class="align_left">校验码：<span class="content_td_blue" id="jym_dzfp"></span></td>
                  <td>&nbsp;</td>
                  <td class="align_left">机器编号：<span class="content_td_blue" id='sbbh_dzfp'></span></td>
                  <td>&nbsp;</td>
                </tr>
              </table>
              <table style="width:100%" border="0" cellspacing="0" cellpadding="0" class="fppy_table">
              <tr>
                <td rowspan="4" class="align_center" width="20"><p>购</p>
                <p>买</p>
                <p>方</p></td>
                <td class="align_left borderNo" width="105">名称：</td>
                <td  nowrap class="align_left borderNo bgcolorWhite"><span class="content_td_blue" id='gfmc_dzfp'></span></td>
                <td rowspan="4" class="align_center" width="20"> <p>密</p>
                <p>码</p>
                <p>区</p></td>
                <td rowspan="4" nowrap class="align_left " width="350" id="password_dzfp">&nbsp;</td>
                </tr>
                <tr >
                  <td class="align_left borderNo">纳税人识别号：</td>
                  <td  nowrap class="align_left borderNo"><span class="content_td_blue" id='gfsbh_dzfp'></span></td>
                </tr>
                <tr>
                  <td class="align_left borderNo" valign="top">地址、电话：</td>
                  <td   class="align_left borderNo" valign="top"><span class="content_td_blue" id='gfdzdh_dzfp'></span></td>
                </tr>
                <tr>
                  <td class="align_left borderNo" valign="top">开户行及账号：</td>
                  <td   class="align_left borderNo" valign="top"><span class="content_td_blue" id='gfyhzh_dzfp'></span></td>
                </tr>
                
                <!--表头-->
                <tr>
                  <td colspan="5" ><table cellspacing="0" cellpadding="0" style="width:100%;" class="fppy_table_box">
                    <tr id="tab_head_dzfp">
                      <td class="align_center borderRight" width="30%">货物或应税劳务、服务名称</td>
                      <td class="align_center borderRight" width="10%">规格型号</td>
                      <td class="align_center borderRight" width="5%">单位</td>
                      <td class="align_center borderRight" width="10%">数量</td>
                      <td class="align_center borderRight" width="10%">单价</td>
                      <td class="align_center borderRight" width="15%">金额</td>
                      <td class="align_center borderRight" width="5%">税率</td>
                      <td class="align_center" width="15%">税额</td>
                    </tr>
                    <tr >
                      <td class="align_center borderRight">合计</td>
                      <td class="align_center borderRight">&nbsp;</td>
                      <td class="align_center borderRight">&nbsp;</td>
                      <td class="align_center borderRight">&nbsp;</td>
                      <td class="align_center borderRight">&nbsp;</td>
                      <td class="align_right borderRight"><span class="content_td_blue" id="je_dzfp"></span></td>
                      <td class="align_center borderRight">&nbsp;</td>
                      <td class="align_right"><span class="content_td_blue" id="se_dzfp"></span></td>
                    </tr>
                    <tr >
                      <td class="align_center borderRight borderTop" >价税合计（大写）</td>
                      <td colspan="4" class="align_left borderTop" ><span class="align_left"><span class="content_td_blue" id="jshjdx_dzfp"></span></td>
					  <td colspan="3" class="align_left borderTop" ><span style="padding:0 20px;">（小写）</span><span class="content_td_blue" id="jshjxx_dzfp"></span></span></td>
                    </tr>
                  </table></td>
                </tr>
                <!--表头结束-->
                <tr>
                  <td rowspan="4" class="align_center"><p>销</p>
                  <p>售</p>
                  <p>方</p></td>
                  <td class="align_left borderNo">名称：</td>
                  <td class="align_left borderNo"><span class="content_td_blue" id="xfmc_dzfp"></span></td>
                  <td rowspan="4" class="align_center" width="20"><p>备</p>
                  <p>注</p></td>
                  <td rowspan="4" class="align_left content_td_blue" width="350" id="bz_dzfp" valign="top">&nbsp;</td>
                </tr>
                <tr >
                  <td class="align_left borderNo">纳税人识别号：</td>
                  <td class="align_left borderNo"><span class="content_td_blue" id="xfsbh_dzfp"></span></td>
                </tr>
                <tr>
                  <td class="align_left borderNo">地址、电话：</td>
                  <td class="align_left borderNo"><span class="content_td_blue" id="xfdzdh_dzfp"></span></td>
                </tr>
                <tr>
                  <td class="align_left borderNo">开户行及账号：</td>
                  <td class="align_left borderNo"><span class="content_td_blue" id="xfyhzh_dzfp"></span></td>
                </tr>
              </table>
              
            </div>

          </div>
      <!--原始信息  end-->
        <div id="icon_zf" style="position:absolute;top:0px;left:0px;display:none;"><img src="images/icon_zf.png" /></div>
      </div>

         <div style="padding:30px 35px 0px 0px; color:#da534f; font-size:14px; line-height:25px;">
          <strong>特别提示：</strong>
            <br />&raquo;&nbsp;&nbsp;本平台仅提供所查询发票票面信息的查验结果。
            <br />&raquo;&nbsp;&nbsp;若发现发票查验结果与实际交易不符，任何单位或个人有权拒收并向当地税务机关举报。
        </div>
        
      </div>
      
    </div>
  </div>

</div>
<!--content end-->

<script type="text/javascript">

var browser = sessionStorage["browser"];
var data ;
var sechw;
var rule;
if (browser == "edge") {
	var edgedata = sessionStorage["result"];
	 data = JSON.parse(edgedata);
} else {	
    data = window.dialogArguments;
	if (data) {
		rule = sessionStorage["rule"];
	} else {
		data = sessionStorage["result"];
		data = JSON.parse(data);
	}
}
if (browser == "ie8") {
	$('#closebt').hide();
}
	var tempno = data.template;
	var fplx, hwxxs, fpxxs;

	if (tempno == 0) {
		fplx=data.fplx;
		hwxxs=data.hwxx;  
		fpxxs=data.fpxx;
	} else if (tempno == 1) {
		fplx=data.f3ld;
		hwxxs=data.fdzx;  
		fpxxs=data.h2gx;
	} else if (tempno == 2) {
		fplx=data.a3b0;
		hwxxs=data.eb2a;  
		fpxxs=data.f8d7;
	} else if (tempno == 3) {
		fplx=data.c342;
		hwxxs=data.dbd2;  
		fpxxs=data.d64b;
	} else if (tempno == 4) {
		fplx=data.af0b;
		hwxxs=data.c32a;  
		fpxxs=data.a22a;
	} else if (tempno == 5) {
		fplx=data.ecae;
		hwxxs=data.c3c0;  
		fpxxs=data.cb20;
	} else if (tempno == 6) {
		fplx=data.c3c8;
		hwxxs=data.a574;  
		fpxxs=data.da20;
	} else if (tempno == 7) {
		fplx=data.dc02;
		hwxxs=data.cc66;  
		fpxxs=data.ddbb;
	} else if (tempno == 8) {
		fplx=data.b3dd;
		hwxxs=data.c2b9;  
		fpxxs=data.e72d;
	} else if (tempno == 9) {
		fplx=data.f16a;
		hwxxs=data.ceb5;  
		fpxxs=data.a83e;
	}

	  var rules = rule.split('☺');
	  var splitstr = rules[0];
  fpxxs = fpxxs.replaceAll(splitstr, "≡");
  hwxxs = hwxxs.replaceAll(splitstr, "≡");
  splitstr = "≡";
  var sort = data.sort;
  var sortarray = sort.split("_");   
  var tmpfpxx = fpxxs.split("≡");    
  var cysj = tmpfpxx[tmpfpxx.length - 1] ;     
  var tmpfp = new Array(tmpfpxx.length - 4);   
  for (i = 3; i < tmpfpxx.length - 1; i++) {
	  tmpfp[i - 3] = tmpfpxx[i];
  }
  
	var newfpxx = new Array(tmpfpxx.length - 4);   
	for (i = 0; i < tmpfpxx.length - 4; i++) {
		newfpxx[i] = tmpfp[parseInt(sortarray[i])];
	}
	var newfpxxstr = tmpfpxx[0] + "≡" + tmpfpxx[1] + "≡" + tmpfpxx[2] + "≡";
	for (i = 0; i < newfpxx.length; i++) {
		newfpxxstr = newfpxxstr + newfpxx[i] + "≡";
	}
	fpxxs = newfpxxstr + cysj;   
	var cycs=0;

  $(document).ready(function(){
	  if (browser == "edge") {
		  $("#dialogclose").show();
		  document.getElementById('dialogclose').addEventListener('click', function(e) {
			  $("#cover").hide();
		  });
	  } else {
		  $("#dialogclose").hide();
	  }

        if(fpxxs!=null&&fpxxs!=""){
          var fpxx=fpxxs.split("≡");  
          cycs=Number(fpxx[3])+1;       
          $('#fpdm_dzfp').text(fpxx[0]);
          $('#fphm_dzfp').text(fpxx[1]);
          $('#fpcc_dzfp').text(fpxx[2]+"增值税电子普通发票");
          $('#cycs').text("查验次数：第"+cycs+"次");
          $('#cysj').text("查验时间："+fpxx[20]);
          $('#kprq_dzfp').text(FormatDate(fpxx[4], rules[3]));

          $('#xfmc_dzfp').text(fpxx[5]);
          $('#xfsbh_dzfp').text(FormatSBH(fpxx[6], rules[1]));
          $('#xfdzdh_dzfp').text(fpxx[7]);
          $('#xfyhzh_dzfp').text(fpxx[8]);
          
          $('#gfmc_dzfp').text(fpxx[9]);
          $('#gfsbh_dzfp').text(fpxx[10]);
          $('#gfdzdh_dzfp').text(fpxx[11]);
          $('#gfyhzh_dzfp').text(fpxx[12]);
         
          $('#je_dzfp').text('￥'+GetJeToDot(getje(fpxx[18], rules[2])));
          $('#se_dzfp').text('￥'+GetJeToDot(getje(fpxx[14], rules[2])));
          $('#jshjxx_dzfp').text('￥'+GetJeToDot(getje(fpxx[15], rules[2])));

          $('#jshjdx_dzfp').html('&otimes;'+NoToChinese(GetJeToDot(getje(fpxx[15], rules[2])),"10"));
          //$('#bz_dzfp').text(fpxx[16]);
		  $('#bz_dzfp').html("<p class=\"warp\">" + data.jmbz.replace(/\r\n/g, "<br/>").replace(/\n/g, "<br/>") + "</p>");

          $('#sbbh_dzfp').text(fpxx[17]);
          $('#jym_dzfp').text(fpxx[13]);
          
          var zfbz=fpxx[19];
          if(zfbz=='Y'){
               $('#icon_zf').show();
          }
          if(hwxxs!=""){

            var html=GetDzHwxxHtml(hwxxs, rules[4], rules[2]);
            $("#tab_head_dzfp").after(html);
          }
        }      
        $('#tabPage-dzfp').show();  
   

      var tableHeight=$('#tabPage2').height();
      $('#bg_div').height(tableHeight+150);
  });

  $("button#printfp").click(function(){ 
    $("button#printfp").hide();
	$("button#closebt").hide();
	if ( $("button#showmx").length > 0 ) { 
		$("button#showmx").hide();
	}    
    $("div#print_area").printArea(); 
	if (browser == "ie8" ) {
		$("button#printfp").show();
	} else {
		$("button#closebt").show();
		$("button#printfp").show();
	}
	if ( $("button#showmx").length > 0 ) { 
		$("button#showmx").show();
	}
  }); 

  $("button#closebt").click(function(){ 
	if (browser == "edge" || browser == "ie8" || browser == "firefox") {
		$("#cover").hide();
		$("#floatwin").hide();
	} else { 
		parent.arw();
		parent.document.getElementById("dialog-body").contentWindow.document.body.innerText = "";
 		parent.dalog.close();
		$("#cover").hide();
	}
  }); 
 
</script>
</body>
</html>
